<template>
	<view class="detail-container">
		<view class="order-btn"
			v-if="isShowBtn">
			<button style="flex: 1" @click="goReply">回复</button>
			<button style="flex: 3" class="sign-btn" @click="goCompleteTicket">{{countDown}}&nbsp;&nbsp;完成工单</button>
		</view>
		<view class="order-btn" v-if="['completedwithtimeout','completed'].includes(ticketDetail['工单状态']) || isUnitTicket">
			<button class="reply-btn" style="flex: 1" @click="goReply">回复</button>
		</view>
		<lb-picker ref="picker1" mode="selector" :list="handleTypeList" :dataset="{ name: 'label1' }"
			@change="handleChange" @confirm="handleConfirm" @cancel="handleCancel">
		</lb-picker>
		<van-tabs @change="changeTab" color="#1152FC" animated :lazy-render="false" :active="active">
			<van-tab :title-style="active == 0 ? 'color: #1152FC': ''" title="工单信息">
				<!-- <ticket-info :ticketDetail="ticketDetail"></ticket-info> -->
				<view class="status wrap">
					<text>{{ticketType[ticketDetail['工单类型']]}}</text>

					<view v-if="!statusList.includes(ticketDetail['工单状态'])" class="operator-btn btn1"
						@click="handleTap('picker1')">操作</view>
					<!-- <lb-picker ref="picker1" mode="selector" :list="handleTypeList" :dataset="{ name: 'label1' }"
						@change="handleChange" @confirm="handleConfirm" @cancel="handleCancel">
					</lb-picker> -->
				</view>
				<view class="order-content">
					<van-skeleton row="13" :loading="loading">
					<view class="content-item">
						<text class="item-name four">工单状态：</text>
						<text :style="{color: colorType[ticketDetail['工单状态']]}">{{ticketStatusObj[ticketDetail['工单状态']]}}</text>
					</view>
					<view class="content-item">
						<text class="item-name four">工单来源：</text>
						<view style="word-break:break-all;flex: 1;">{{originType[ticketDetail['来源']]}}</view>
					</view>
					<view class="content-item">
						<text class="item-name four">记录编号：</text>
						<view style="word-break:break-all;flex: 1;">{{ticketDetail['工单编号']}}</view>
					</view>
					<view class="content-item">
						<text class="item-name">联系人姓名：</text>
						<view style="word-break:break-all;flex: 1;">{{ticketDetail['联系人姓名']}}</view>
						<!-- <text>{{ticketDetail['联系人姓名']}}</text> -->
					</view>
					<view class="content-item">
						<text class="item-name four">联系人电话：</text>
						<view style="word-break:break-all;flex: 1;">{{ticketDetail['联系人电话']}}</view>
						<!-- <text>{{ticketDetail['联系人电话']}}</text> -->
					</view>
					<view v-if="ticketDetail['接单人姓名']" class="content-item">
						<text class="item-name">接单人姓名：</text>
						<view style="word-break:break-all;flex: 1;">{{ticketDetail['接单人姓名']}}</view>
						<!-- <text>{{ticketDetail['联系人姓名']}}</text> -->
					</view>
					<view v-if="ticketDetail['接单人电话']" class="content-item">
						<text class="item-name four">接单人电话：</text>
						<view style="word-break:break-all;flex: 1;">{{ticketDetail['接单人电话']}}</view>
						<!-- <text>{{ticketDetail['联系人电话']}}</text> -->
					</view>
					<view class="content-item">
						<text class="item-name four">工单类型：</text>
						<text>{{ticketType[ticketDetail['工单类型']]}}</text>
					</view>
					<view class="content-item">
						<text class="item-name four">报事位置：</text>
						<view style="word-break:break-all;flex: 1;">{{ticketDetail['报事位置']}}</view>
						<!-- <text>{{ticketDetail['报事位置']}}</text> -->
					</view>
					<view class="content-item" v-if="checkTicket['竣工时间']">
						<text class="item-name four">竣工时间：</text>
						<text>{{checkTicket['竣工时间']}}</text>
					</view>
					<view class="content-item" v-if="renovationTicket['装修事项']">
						<text class="item-name four">装修事项：</text>
						<view style="word-break:break-all;flex: 1;">{{renovationTicket['装修事项']}}</view>
						<!-- <text>{{renovationTicket['装修事项']}}</text> -->
					</view>
					<view class="content-item" v-if="renovationTicket">
						<text class="item-name four">施工单位：</text>
						<view style="word-break:break-all;flex: 1;">{{renovationTicket['施工单位']}}</view>
						<!-- <text>{{renovationTicket['施工单位']}}</text> -->
					</view>
					<view class="content-item" v-if="renovationTicket">
						<text class="item-name">施工负责人：</text>
						<view style="word-break:break-all;flex: 1;">{{renovationTicket['施工负责人']}}</view>
						<!-- <text>{{renovationTicket['施工负责人']}}</text> -->
					</view>
					<view class="content-item" v-if="renovationTicket">
						<text class="item-name">负责人电话：</text>
						<view style="word-break:break-all;flex: 1;">{{renovationTicket['负责人电话']}}</view>
					</view>
					<view class="content-item" v-if="renovationTicket">
						<text class="item-name four">装修期限：</text>
						<text>{{startTime + ' 至 ' + endTime}}</text>
					</view>
					<view v-if="ticketDetail['上门时间']" class="content-item">
						<text class="item-name four">上门时间：</text>
						<text>{{ticketDetail['上门时间']}}</text>
					</view>
					<view class="content-item">
						<text class="item-name four">创建时间：</text>
						<text>{{ticketDetail['创建时间'] | formatTime}}</text>
					</view>
					<view v-if="ticketDetail['接单时间']" class="content-item">
						<text class="item-name four">接单时间：</text>
						<text>{{ticketDetail['接单时间'] | formatTime}}</text>
					</view>
					<!-- <view  class="content-item">
						<text class="item-name four">完成时限：</text>
						<text>{{formatCountDown(timeLimit)}}</text>
					</view> -->
					<view class="content-item">
						<text class="item-name four">所属小区：</text>
						<view style="word-break:break-all;flex: 1;">{{ticketDetail['所属项目名称']}}</view>
						<!-- <text>{{ticketDetail['所属项目名称']}}</text> -->
					</view>
					<view v-if="ticketDetail['报事描述']" class="content-item">
						<text class="item-name four">报事描述：</text>
						<view style="word-break:break-all;flex: 1;">{{ticketDetail['报事描述']}}</view>
					</view>
					
					<view class="content-item">
						<text class="item-name">工单附件：</text>
					</view>
					<view v-if="imgLength !== 0" class="content-img">
						<view class="img-item" v-if="ticketFile[0].fileData">
							<van-image @click="previewImage(0)" fit="cover" width="110" height="110"
								:src="ticketFile[0].fileData" />
						</view>
						<view class="img-item" v-if="ticketFile[1].fileData">
							<van-image @click="previewImage(1)" fit="cover" width="110" height="110"
								:src="ticketFile[1].fileData" />
						</view>
						<view class="img-item" v-if="ticketFile[2].fileData">
							<van-image @click="previewImage(2)" fit="cover" width="110" height="110"
								:src="ticketFile[2].fileData" />
						</view>
					</view>
					<van-empty description="暂无附件" v-else />
					<view v-if="ticketDetail['处理结果']" class="content-item auto">
						<text class="item-name four">处理结果：</text>
						<view style="word-break:break-all;flex: 1;">{{ticketDetail['处理结果']}}</view>
					</view>
					<view v-if="ticketDetail['处理时间']" class="content-item">
						<text class="item-name four">处理时间：</text>
						<text>{{ticketDetail['处理时间'] | formatTime}}</text>
					</view>
					<view
						v-if="ticketDetail['工单状态'] === 'completed' || ticketDetail['工单状态'] === 'completedwithtimeout'">
						<view class="content-item">
							<text class="item-name">处理结果附件：</text>
						</view>
						<view v-if="ticketDetail['处理结果附件']" class="content-img">
							<view class="img-item" v-if="resultFile[0].fileData">
								<van-image @click="previewResult(0)" fit="cover" width="110" height="110"
									:src="resultFile[0].fileData" />
							</view>
							<view class="img-item" v-if="resultFile[1].fileData">
								<van-image @click="previewResult(1)" fit="cover" width="110" height="110"
									:src="resultFile[1].fileData" />
							</view>
							<view class="img-item" v-if="resultFile[2].fileData">
								<van-image @click="previewResult(2)" fit="cover" width="110" height="110"
									:src="resultFile[2].fileData" />
							</view>
						</view>
						<van-empty description="暂无附件" v-else />
					</view>
					<view v-if="ticketDetail['完成时间']" class="content-item">
						<text class="item-name four">完成时间：</text>
						<text>{{ticketDetail['完成时间'] | formatTime}}</text>
					</view>
					<view v-if="ticketDetail['废弃时间']" class="content-item">
						<text class="item-name four">废弃时间：</text>
						<text>{{ticketDetail['废弃时间'] | formatTime}}</text>
					</view>
					<view class="sign-img" v-if="signFile">
						<view class="left-text">业主签字:</view>
						<van-image fit="cover" width="110" height="110" :src="signFile" />
					</view>
					</van-skeleton>
				</view>
					
				<button class="accept-ticket" @click="accept" v-if="ticketDetail['工单状态'] == 'unclaimed'">接单</button>
			</van-tab>
			<van-tab :title-style="active == 1 ? 'color: #1152FC': ''" title="跟进信息">
				<view class="status" v-if="!statusList.includes(ticketDetail['工单状态'])">
					<view class="operator-btn" @click="handleTap('picker1')">操作</view>
				</view>
				<!-- <lb-picker ref="picker2" mode="selector" :list="handleTypeList" :dataset="{ name: 'label2' }"
					@change="handleChange" @confirm="handleConfirm" @cancel="handleCancel">
				</lb-picker> -->
				<view class="example-body" style="height: 100vh;">
					<my-steps :options="ticketDetail['跟进信息']" active-color="#5094FF"
						:active="ticketDetail['跟进信息'].length-1" direction="column" />
				</view>
			</van-tab>
			<van-tab :title-style="active == 2 ? 'color: #1152FC': ''" title="工单进程">
				<view class="status" v-if="!statusList.includes(ticketDetail['工单状态']) && !isHaveRecord">
					<view class="operator-btn" @click="handleTap('picker1')">操作</view>
				</view>
				<!-- <lb-picker ref="picker3" mode="selector" :list="handleTypeList" :dataset="{ name: 'label3' }"
					@change="handleChange" @confirm="handleConfirm" @cancel="handleCancel">
				</lb-picker> -->
				<view class="example-body" style="height: 100vh;">
					<assist-step v-if="assistStep.length" :options="assistStep" active-color="#5094FF"
						:active="assistStep.length-1" direction="column" />
					<view class="bgwhite" v-else>
						<van-empty description="暂无联动记录"></van-empty>
					</view>
				</view>
			</van-tab>
			<!-- <van-tab :title-style="active == 3 ? 'color: #1152FC': ''" title="四平台">
				<event-record v-if="isHaveRecord" :eventInfo="eventInfo" :ticketStatus="ticketDetail['工单状态']"></event-record>
				<view v-else class="bgwhite">
					<van-empty description="暂无事件记录"></van-empty>
				</view>
			</van-tab> -->
			<!-- <van-tab :title-style="active == 4 ? 'color: #1152FC': ''" title="区人大">
				<district-record v-if="isHaveDistrict" :districtInfo="districtInfo" ></district-record>
				<view v-else class="bgwhite">
					<van-empty description="暂无记录"></van-empty>
				</view>
			</van-tab> -->
		</van-tabs>
	</view>
</template>

<script>
	import mySteps from '@/myComponents/my-steps/my-steps.vue'
	import assistStep from '@/myComponents/assistStep.vue'
	import LbPicker from '@/components/lb-picker/index.vue'
	import eventRecord from './components/eventRecord.vue'
	import districtRecord from './components/districtRecord.vue'
	import {
		previewImg
	} from '@/utils/previewImg'
	import dayjs from "dayjs";
	import {
		mapState,
		mapMutations,
		mapGetters
	} from 'vuex'
	export default {
		components: {
			districtRecord,
			eventRecord,
			mySteps,
			LbPicker,
			assistStep
		},
		data() {
			return {
				loading: true,
				ticketStatusObj: this.$type.ticketStatus,
				colorType: this.$type.colorType,
				eventInfo: {},
				isHaveRecord: true,
				districtInfo: {},
				isHaveDistrict: true,
				assignType: this.$type.assignType,
				active: 0,
				statusList: ['completed', 'abandoned', 'completedwithtimeout', 'unclaimed'],
				timerId: '',
				countDown: '',
				handleTypeList: this.$type.handleTypeList,
				originType: this.$type.originType,
				context: null,
				value1: '',
				label1: '',
				tabCurrentIndex: 0,
				resultUrl: '../../static/icon/8.png',
				ticketId: null,
				ticketDetail: {},
				params: {
					id: null,
					操作类型: null,
					操作原因: null,
					操作附件: []
				},
				ticketType: this.$type.ticketType,
				params1: {
					姓名: null,
					身份证号: null,
					所属单位: null,
					人员类型: null,
					负责项目: null,
					负责工单类型: null,
					电话: null,
					状态: 1
				},
				params2: {
					id: null,
					接单人id: null,
					操作原因: null
				},
				operatorList: [],
				ticketFile: {},
				file: {
					fileName: null,
					fileData: null
				},
				signFile: '',
				imgLength: 0,
				imgItem: [],
				resultItem: [],
				resultFile: {},
				接单人id: null,
				renovationTicket: null,
				startTime: null,
				endTime: null,
				checkTicket: null,
				loading: true,
				params3: {
					id: null,
					接单人id: null,
					操作原因: null
				},
				url: '',
				params4: {
					code: null
				},
				addressUrl: '',
				assistStep: []
			}
		},
		onLoad(options) {
			this.ticketId = +options.id
			this.params2.id = +options.id
			this.getTicketDetail()
			this.getEventInfo()
			this.getDistrictInfo()
			// this.getAssistStep()
		},
		onShow() {

		},
		computed: {
			...mapState(['isUnitTicket', 'isMyTicket']),
			...mapGetters(['personType']),
			isShowBtn() {
				return !this.statusList.includes(this.ticketDetail['工单状态']) && !this.isUnitTicket
			}
		},
		methods: {
			changeTab(name, title) {
				this.active = name.target.index
			},
			getEventInfo() {
				this.$http2.post('ticketSystem/tipoff/info', {
					ticketId: this.ticketId
				}).then(res => {
					if (res.code === 10000) {
						console.log(res)
						this.eventInfo = res.data
					} else if (res.code === 50011) {
						this.isHaveRecord = false
					}
				})
			},
			getDistrictInfo() {
				this.$http2.post('ticketSystem/district/info', {
					ticketId: this.ticketId
				}).then(res => {
					if (res.code === 10000) {
						this.districtInfo = res.data
						console.log(res)
					} else if (res.code === 50010) {
						this.isHaveDistrict = false
					}
				})
			},
			urgentTicket() {
				uni.showLoading({
					mask: true
				})
				this.$http2.post('ticketSystem/ticket/press', {
					id: this.ticketId
				}).then(res => {
					if (res.code === 10000) {
						uni.showToast({
							title: '催办成功'
						})
					}
				})
			},
			getAssistStep() {
				this.$http2.post('ticketSystem/assist/list', {
					ticketId: +this.ticketId
				}).then(res => {
					if (res.code === 10000) {
						// console.log(res)
						// this.assistStep = res.data.list
						this.assistStep = res.data.list.map((x, index) => {
							let lastTime;
							if (index == 0) {
								lastTime = new Date(x.assistTime).getTime() - new Date(this.ticketDetail[
									'接单时间']).getTime()
								console.log('lastTime:', lastTime)
							} else if (index > 0 && index < res.data.list.length - 1) {
								lastTime =
									new Date(res.data.list[index].assistTime).getTime() -
									new Date(res.data.list[index - 1].assistTime).getTime();
							} else if (index == res.data.list.length - 1) {
								lastTime = Date.now() - new Date(x.assistTime).getTime();
							}
							return {
								assistType: x.assistType,
								assistTime: x.assistTime,
								reason: x.reason,
								lastTime: this.$funs.secondToHour(lastTime / 1000),
							};
						});
						const flag = this.assistStep.find(item => item.assistType === 4)
						if(!this.assistStep.length || ![3,5].includes(this.assistStep[this.assistStep.length - 1].assistType) || flag) {
							this.handleTypeList = this.handleTypeList.filter(item => item.id !== 6)
							// console.log(this.handleTypeList)
						} 
					}
				})
			},
			accept() {
				uni.showModal({
					title: '提示',
					content: '确认接手该工单吗？',
					success: (res) => {
						if (res.confirm) {
							this.acceptTicket()
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				})
			},
			acceptTicket() {
				uni.showLoading({
					mask: true
				})
				this.params3.id = +this.ticketId
				this.params3.接单人id = uni.getStorageSync('userInfo').id
				this.params3.接单单位 = uni.getStorageSync('currentUnitId')
				this.$http2.post('ticketSystem/ticket/assign', this.params3).then(res => {
					if (res.code === 10000) {
						uni.redirectTo({
							url: '../acceptSuccess/acceptSuccess?path=../index/index' + '&title=返回工单首页'
						})
					}
				})
			},
			goCompleteTicket() {
				if (this.personType === 3) {
					uni.showToast({
						title: '没有该工单的完成权限',
						icon: 'none'
					})
					return
				}
				if(this.isHaveDistrict) {
					uni.navigateTo({
						url: '../pushResult/pushResult?item=' + JSON.stringify(this.ticketDetail)
					})
					return
				}
				uni.navigateTo({
					url: '../completeTicket/completeTicket?id=' + this.ticketId
				})
			},
			goReply() {
				uni.navigateTo({
					url: '../reply/reply?id=' + this.ticketId
				})
			},
			// 响应工单
			responseTicket() {
				uni.showLoading()
				this.$http2.post('ticketSystem/ticket/response', {
					id: +this.ticketId
				}).then(res => {
					console.log(res)
					if (res.code === 10000) {
						this.ticketDetail['工单状态'] = 'handling'
						uni.showToast({
							title: '响应成功'
						})
					}
				})
			},
			handleTap(name) {
				const isDistrict = this.handleTypeList.find(item => item.id == 7)
				if(this.assistStep.length && [3,4].includes(this.assistStep[this.assistStep.length - 1].assistType) && !this.isHaveDistrict && !isDistrict) {
					this.handleTypeList = [...this.handleTypeList,{id: 7, value: '接入区人大', label: '接入区人大'}]
				}
				this.$refs[name].show()
			},
			handleChange(e) {
				console.log('change::', e)
			},
			handleConfirm(e) {
				uni.showTabBar({
					animation: true
				})
				// 如果存在多个picker，可以在picker上设置dataset属性，confirm中获取，就能区分是哪个picker了
				console.log('confirm::', e)
				if (e) {
					const name = e.dataset.name
					const label = e.item.label
					if (e.item.id === 5) {
						this.urgentTicket()
						return
					}
					if (e.item.id === 1) {
						uni.navigateTo({
							url: this.$type.handleTypeUrl[e.item.id] + this.ticketId + '&projId=' + this
								.ticketDetail['所属项目id']
						})
						return
					}
					if ([6,7].includes(e.item.id)) {
						uni.navigateTo({
							url: this.$type.handleTypeUrl[e.item.id] + this.ticketId + '&item=' + JSON.stringify(
								this.ticketDetail)
						})
						return
					}
					if(e.item.id === 3 && (this.isHaveRecord || this.isHaveDistrict)) {
						uni.showToast({
							title: '没有废弃权限',
							icon: 'none'
						})
						return
					}
					if(e.item.id === 4) {
						uni.navigateTo({
							url: this.$type.handleTypeUrl[e.item.id] + this.ticketId + '&projId=' + this.ticketDetail.所属项目id
						})
						return
					}
					uni.navigateTo({
						url: this.$type.handleTypeUrl[e.item.id] + this.ticketId
					})
					if (name && label) {
						this[name] = label
					}
				}
			},
			handleCancel(e) {
				uni.showTabBar({
					animation: true
				})
				console.log('cancel::', e)
			},
			formatCountDown(data) {
				this.$funs.formatCountDown(data, this.ticketDetail['时限'])

			},
			// 获取工单详情
			getTicketDetail() {
				// uni.showLoading({
				// 	mask: true
				// })
				this.$http2.post('ticketSystem/ticket/info', {
					id: +this.ticketId
				}).then(res => {
					console.log(res)
					if (res.code === 10000) {
						// this.params1.负责项目 = res.data.所属项目id
						if (res.data.工单计时类型) {
							this.timerId = setInterval(() => {
								// console.log('触发')
								if(res.data.工单计时 == 0) {
									res.data.工单计时类型 = 2
									res.data.工单状态 = 'timeout'
								}
								
								this.countDown = this.$funs.formatCountDown(res.data, res.data.时限)
								res.data.工单计时--
								if (res.data.工单计时 === -1) {
									clearInterval(this.timerId)
									return
								}
							}, 1000)
						}

						if (res.data.工单类型 === 'H' && res.data.上门时间) {
							res.data.上门时间 = dayjs(res.data.上门时间).format('YYYY-MM-DD')
						}
						this.ticketDetail = res.data
						// this.ticketDetail.上门时间 = dayjs(this.ticketDetail.上门时间).format('YYYY-MM-DD')
						this.renovationTicket = res.data.装修申请工单
						this.checkTicket = res.data.装修验收工单
						if (this.checkTicket !== null) {
							this.checkTicket.竣工时间 = dayjs(this.checkTicket.竣工时间).format('YYYY-MM-DD')
						}
						if (res.data.装修申请工单 !== null) {
							this.startTime = dayjs(this.renovationTicket.装修开始时间).format('YYYY-MM-DD')
							this.endTime = dayjs(this.renovationTicket.装修结束时间).format('YYYY-MM-DD')
						}
						this.接单人id = res.data.接单人id
						let that = this
						res.data.跟进信息.forEach(item => {
							item.时间 = dayjs(item.时间).format("YYYY-MM-DD HH:mm:ss")
							item.附件图片 = []
							item.附件.forEach(x => {
								if (x) {
									that.$funs.downloadImage(x, (res) => {
										item.附件图片.push(res.fileData)
									})
								}

							})
						})
						if (res.data.报事附件 !== null) {
							res.data.报事附件.forEach((item, index) => {
								this.downloadFile(item, index)
							})
						}
						if (res.data.处理结果附件 !== null) {
							res.data.处理结果附件.forEach((item, index) => {
								this.downloadResult(item, index)
							})
						}
						if (res.data.业主签字 !== '') {
							this.downloadSign(res.data.业主签字)
						}
						if (res.data.工单状态 === 'pending' && !this.isUnitTicket && res.data.接单人id === uni
							.getStorageSync('userInfo').id) {
							this.responseTicket()
						}
						if (res.data.工单状态 === 'timeout') {
							this.handleTypeList = this.$type.handleTypeList.filter(item => item.id !== 2)
						}
						if (!this.isUnitTicket) {
							this.handleTypeList = this.handleTypeList.filter(item => item.id !== 5)
						}
						if (!res.data.工单计时类型) {
							this.handleTypeList = this.handleTypeList.filter(item => item.id !== 2)
						}
						this.loading = false
						this.getAssistStep()
					}
				})
			},
			downloadSign(id) {
				this.$http2.post('common/file/download', {
					id
				}).then(res => {
					console.log(res.data.fileData)
					if (res.code === 10000) {
						this.signFile = res.data.fileData
					}
				})
			},
			downloadResult(id, index) {
				// this.imgLength++
				this.$http2.post('common/file/download', {
					id
				}).then(res => {
					console.log(res)
					if (res.code === 10000) {
						this.imgItem.push(res.data.fileData)
						this.resultFile[index] = {}
						this.resultFile[index].fileData = res.data.fileData
					}
				})
			},
			downloadFile(id, index) {
				this.imgLength++
				this.$http2.post('common/file/download', {
					id
				}).then(res => {
					console.log(res)
					if (res.code === 10000) {
						this.imgItem.push(res.data.fileData)
						this.ticketFile[index] = {}
						this.ticketFile[index].fileData = res.data.fileData
					}
				})
			},
			previewImage(index) {
				// console.log(index)
				let previewList = []
				if (this.ticketFile[0]) {
					previewList.push(this.ticketFile[0].fileData)
				}
				if (this.ticketFile[1]) {
					previewList.push(this.ticketFile[1].fileData)
				}
				if (this.ticketFile[2]) {
					previewList.push(this.ticketFile[2].fileData)
				}
				previewImg(previewList, index)
			},
			previewResult(index) {
				let previewList = []
				if (this.resultFile[0]) {
					previewList.push(this.resultFile[0].fileData)
				}
				if (this.resultFile[1]) {
					previewList.push(this.resultFile[1].fileData)
				}
				if (this.resultFile[2]) {
					previewList.push(this.resultFile[2].fileData)
				}
				previewImg(previewList, index)
			}
		}
	}
</script>

<style lang="scss">
	@import  '../../style/detail.scss';
	
</style>